#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,i;
	double ji=0,ou=0;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		if(i%2==0)
		ou=ou+1.0/i;
		else
		ji=ji+1.0/i;
	}
	printf("%.4f",ji-ou);
    return 0;
}

